package com.ruoyi.http.controller;

import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.http.domain.Http;
import com.ruoyi.http.domain.WeChat01500T;
import com.ruoyi.http.service.IWeChatTService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/http/weChat01500")
public class WeChat01500 extends BaseController {

    @Autowired
    private IWeChatTService weChatTService;
    @PostMapping("/weChat")
    public AjaxResult http(@RequestBody Http http) {
        WeChat01500T weChat = new WeChat01500T();
        WeChat01500T weChat01500T = JSONObject.toJavaObject(JSONObject.parseObject(JSONObject.toJSONString(http.getBody())), WeChat01500T.class);
        weChatTService.insertCostInfo(weChat01500T);
        return AjaxResult.success(weChat);
    }
}